/**
 * jims
 */
package com.jims.master.modules.sync.entity;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.jims.master.common.persistence.TreeEntity;
import com.jims.master.modules.sys.entity.OrgDept;
import org.hibernate.validator.constraints.Length;

import java.util.List;

/**
 * 检验类别Entity
 * @author 赵宁
 * @version 2017-02-24
 */
public class LabType extends TreeEntity<LabType> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 类型名称
	private String level;		// 级别
	private String performedBy;		// 执行科室
	//private LabType parent;		// 父级菜单
	private String parentIds;		// 所有父级编号
	private String remarks;		// 备注信息

	private OrgDept orgDept; //执行科室
	private List<LabVsClinic> clinicItemDictList;
	private String clinicItemDictLists; //诊疗项目id集合
	private List<PriceList> priceListList; // 价表项目
    private String patientId;		// 病人id
    private String clinicId;		// 门诊id
	public LabType() {
		super();
	}

	public LabType(String id){
		super(id);
	}

	public List<PriceList> getPriceListList() {
		return priceListList;
	}

	public void setPriceListList(List<PriceList> priceListList) {
		this.priceListList = priceListList;
	}

	@Length(min=1, max=200, message="类型名称长度必须介于 1 和 200 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	
	@Length(min=0, max=11, message="级别长度必须介于 0 和 11 之间")
	public String getLevel() {
		return level;
	}

	public void setLevel(String level) {
		this.level = level;
	}
	
	@Length(min=0, max=100, message="执行科室长度必须介于 0 和 100 之间")
	public String getPerformedBy() {
		return performedBy;
	}

	public void setPerformedBy(String performedBy) {
		this.performedBy = performedBy;
	}
	
	@JsonBackReference
	public LabType getParent() {
		return parent;
	}

	public void setParent(LabType parent) {
		this.parent = parent;
	}
	
	@Length(min=0, max=2000, message="所有父级编号长度必须介于 0 和 2000 之间")
	public String getParentIds() {
		return parentIds;
	}

	public void setParentIds(String parentIds) {
		this.parentIds = parentIds;
	}
	
	@Length(min=0, max=500, message="备注信息长度必须介于 0 和 500 之间")
	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public OrgDept getOrgDept() {
		return orgDept;
	}

	public void setOrgDept(OrgDept orgDept) {
		this.orgDept = orgDept;
	}

	public List<LabVsClinic> getClinicItemDictList() {
		return clinicItemDictList;
	}

	public void setClinicItemDictList(List<LabVsClinic> clinicItemDictList) {
		this.clinicItemDictList = clinicItemDictList;
	}

	public String getClinicItemDictLists() {
		String clinicItemDictString="";
        if(clinicItemDictList!=null&&!clinicItemDictList.isEmpty()){
            for (int i = 0; i <clinicItemDictList.size(); i++) {
                LabVsClinic labVsClinic=  clinicItemDictList.get(i);
                clinicItemDictString+=labVsClinic.getClinicId()+",";
            }
        }
 		return clinicItemDictString;
 	}

	public void setClinicItemDictLists(String clinicItemDictLists) {
		this.clinicItemDictLists = clinicItemDictLists;
	}

    public String getPatientId() {
        return patientId;
    }

    public void setPatientId(String patientId) {
        this.patientId = patientId;
    }

    public String getClinicId() {
        return clinicId;
    }

    public void setClinicId(String clinicId) {
        this.clinicId = clinicId;
    }
}